package com.happe.foodeasy.service;

import com.happe.foodeasy.dto.CommodityBaseDTO;
import com.happe.foodeasy.dto.CommodityTypeDTO;
import com.happe.foodeasy.dto.PageInfoDto;

import java.util.List;

public interface CommodityService {
    /**
     * this method is used to select total count of target type and state commodity
     *
     * @param commodityTypeId  type id
     * @param commodityStateId state id
     * @return total count
     */
    long selectTotalCountByParam(long commodityTypeId, long commodityStateId);

    /**
     * 这个方法用于获得特定的商品类型的商品
     *
     * @param commodityTypeId 商品类型的id
     * @param pageInfoDto     分页信息
     * @return 查找到的所有商品信息
     */
    List<CommodityBaseDTO> selectTargetCommodityByParam(long commodityTypeId, PageInfoDto pageInfoDto);

    /**
     * This method is used to retrieve all type of commodity
     *
     * @return the entity of commodity type
     */
    List<CommodityTypeDTO> selectAllCommodityType();
}
